package com.yq.ylmall.user.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.yq.ylmall.model.user.UserAddress;
import com.yq.ylmall.user.mapper.UserAddressMapper;
import com.yq.ylmall.user.service.IUserAddressService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 * 用户地址表 服务实现类
 * </p>
 *
 * @author cherry
 * @since 2024-06-03
 */
@Service
public class UserAddressServiceImpl extends ServiceImpl<UserAddressMapper, UserAddress> implements IUserAddressService {

    public List<UserAddress> getAddressByUserId(Long id) {
        QueryWrapper<UserAddress> queryWrapper = new QueryWrapper();
        queryWrapper.eq("user_id",id);
        return baseMapper.selectList(queryWrapper);
    }
}
